package com.zxw.设计模式.行为型模式.观察者模式.摇号应用实例.service.impl;

import com.zxw.设计模式.行为型模式.观察者模式.摇号应用实例.EventManager;
import com.zxw.设计模式.行为型模式.观察者模式.摇号应用实例.domain.LotteryResult;
import com.zxw.设计模式.行为型模式.观察者模式.摇号应用实例.service.LotteryService;

import java.util.Date;

/**
 * @projectName: util-cloud
 * @package: com.zxw.设计模式.行为型模式.观察者模式.摇号应用实例.service.impl
 * @className: LotteryServiceImpl
 * @author: zhangxuewei
 * @description: 摇号调用服务
 * @date: 2023/10/9 14:45
 * @version: 1.0
 */
public class LotteryServiceImpl extends LotteryService {

    private DrawHouseServiceImpl drawHouseService = new DrawHouseServiceImpl();

    @Override
    public LotteryResult lottery(String userId) {
        String res = drawHouseService.lots(userId);
        return new LotteryResult(userId, res, new Date());
    }

}
